package cn.edu.zjicm.wordsnet_d.util;

import android.content.Context;
import android.graphics.Typeface;
import android.widget.TextView;

public class TypefaceUtil {
	private static TypefaceUtil uniqueInstance;
	private Typeface typeFace;
	private Context context;

	private TypefaceUtil(Context context) {
		typeFace = Typeface.createFromAsset(context.getAssets(), "fonts/iwordnetfont.ttf");
	}

	public static TypefaceUtil getInstance(Context context) {
		if (uniqueInstance == null) {
			uniqueInstance = new TypefaceUtil(context);
		}
		return uniqueInstance;
	}

	public void setTypeface(TextView mTextView) {
		mTextView.setTypeface(typeFace);
	}

	public Typeface getTypeface() {
		return typeFace;
	}
}
